﻿CREATE TABLE [dbo].[PersonHandelseLogg] (
    [Id]               UNIQUEIDENTIFIER NOT NULL,
    [ValId]            UNIQUEIDENTIFIER NOT NULL,
    [Skapad]           DATETIME         NOT NULL,
    [SkapadAv]         NVARCHAR (50)    NOT NULL,
    [Andrad]           DATETIME         NULL,
    [AndradAv]         NVARCHAR (50)    NULL,
    [UppfoljningKravs] BIT              NOT NULL,
    [Text]             TEXT             NOT NULL,
    [PersonId]         UNIQUEIDENTIFIER NOT NULL,
    [Datum]            DATETIME         NOT NULL,
    CONSTRAINT [PK_PersonHandelseLogg] PRIMARY KEY CLUSTERED ([Id] ASC, [ValId] ASC),
    CONSTRAINT [FK_PersonHandelseLogg_Person] FOREIGN KEY ([PersonId], [ValId]) REFERENCES [dbo].[Person] ([Id], [ValId])
);



